package com.lightjet.macross.base.upms.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.lightjet.macross.common.core.IntKeyBaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name="APP_APIRULES")
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler","createDate","updateDate"})
public class ApiRules extends IntKeyBaseEntity {

    public ApiRules(Integer id) {
        this.id = id;
    }

    // 服务名称
    private String servicename;

    // 接口路径 （匹配 antMatch 规则）
    private String apiuri;

    // 规则类型 1-白名单 0-黑名单（待实现）
    private byte ruletype = 1;

    // 客户端列表 用,分割
    @Column(length = 4000)
    private String clients;

    // 用户使用客户端挂接的租户系统中的角色列表 用,分割
    @Column(length = 4000)
    private String roles;

    // 规则是否启用 1-启用 0-禁用
    private byte isenable = 1;

    // 请求方法规则
    private String methods;

    // 规则说明
    @Column(length = 1000)
    private String ruledes;

    // 规则备注
    @Column(length = 1000)
    private String remark;



}
